<?php

namespace app\common\model\billiard;

use addons\mycurrency\library\Common;
use think\Exception;
use think\Model;
use traits\model\SoftDelete;

class Goods extends Model
{

    //use SoftDelete;


    // 表名
    protected $name = 'billiard_goods';

    const STATUS_ZHENGCHENG = 1;//代理商状态 = 正常
    const STATUS_JINYONG = 2;//代理商状态 = 禁用

//    public function getAbbreviationImageAttr($value){
//        $baseUrl = Common::GetHost();
//        return $baseUrl . $value;
//    }

    public function getAlbumImagesAttr($value){
        $all = explode(',',$value);
        $baseUrl = Common::GetHost();
        foreach($all as $k => $v){
            $all[$k] = $baseUrl . $v;
        }
        return $all;
    }

}
